package com.boc.langxiang.ui.adapter.me;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.ViewGroup;

import com.boc.langxiang.Constant;
import com.boc.langxiang.ui.fragment.BaseFragment;

import java.util.List;

/**
 * Created by admin on 2016/6/23.
 */
public class OrdersAllPagerAdapter extends FragmentPagerAdapter{

    private List<BaseFragment> mList;

    public OrdersAllPagerAdapter(FragmentManager fm, List<BaseFragment> list) {
        super(fm);
        this.mList = list;
    }

    @Override
    public Fragment getItem(int position) {
        return mList.get(position);
    }

    @Override
    public int getCount() {
        return mList.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mList.get(position).getArguments().getString(Constant.ME_ALL_ORDERS);
    }

    @Override
    public void destroyItem(ViewGroup container, int position, Object object) {
    }
}
